//
//  MusicListCell.m
//  musicPlayer
//
//  Created by 遇水 on 15/6/19.
//  Copyright (c) 2015年 YS. All rights reserved.
//

#import "MusicListCell.h"
#import "MusicModel.h"
#import "UIImage+MJ.h"

@implementation MusicListCell


+(instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *ID = @"MusicCell";
    MusicListCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell==nil) {
        cell = [[MusicListCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
    }
    return cell;
    
}

/**
 *  设置数据
 *
 *  @param music <#music description#>
 */-(void)setMusic:(MusicModel *)music
{
    _music = music;
    self.textLabel.text = music.name;
    self.detailTextLabel.text = music.singer;
    self.imageView.image = [UIImage circleImageWithName:music.singerIcon borderWidth:2 borderColor:[UIColor purpleColor]];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
